import string
list =[]
s =input("请输入一串字符：")
for i in range(len(s)):
    if s[i]  in string.ascii_letters:
        list.append(s[i])
print(''.join(reversed(list)))
